<?php
	class BillSign{		
		public static function signCharset($bill_config){
			///生成加密串,注意顺序
		   $scrtStr="merchant_id=".$bill_config['merchant_id']."&orderid=".$bill_config['orderid']."&amount=".$bill_config['amount']."&merchant_url=".$bill_config['merchant_url']."&merchant_key=".$bill_config['merchant_key'];
		   return $mac = strtoupper(md5($scrtStr));
		}
		
		 /**
	     * 生成签名结果
	     */
	    public static function notifySign($params){
	        ///生成加密串,注意顺序
		    $scrtStr = "merchant_id=".$params['merchant_id']."&orderid=".$params['orderid']."&amount=".$params['amount']."&date=".$params['dealdate']."&succeed=".$params['succeed']."&merchant_key=".$params['merchant_key'];  
	    	return $mymac = strtoupper(md5($scrtStr));
    	}
	}

?>